/**
 * 
 * Copyright (C) 2011 Cody Stoutenburg . All rights reserved.
 *
 *       This program is free software; you can redistribute it and/or
 *       modify it under the terms of the GNU Lesser General Public License
 *       as published by the Free Software Foundation; either version 2.1
 *       of the License, or (at your option) any later version.
 *
 *       This program is distributed in the hope that it will be useful,
 *       but WITHOUT ANY WARRANTY; without even the implied warranty of
 *       MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 *       GNU Lesser General Public License for more details.
 *
 *       You should have received a copy of the GNU Lesser General Public License
 *       along with this program; if not, write to the Free Software
 *       Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA  02111-1307, USA. 
 * 
 */
package ca.usherbrooke.agent.controller.shared;

/**
 * @author Cody Stoutenburg
 * 
 */
public abstract class IBehaviourOnWorldChanged<E extends IAgent> extends
		IBehaviour<E> {
	private static final long serialVersionUID = 1L;

	/**
	 * @param agent
	 */
	public IBehaviourOnWorldChanged(E agent) {
		super(agent);
	}

	/**
	 * this method is call each time the agent received a new World <br/>
	 * 
	 * Runs the behaviour. This abstract method must be implemented by
	 * IBehaviourOnWorldChanged to perform ordinary behaviour duty. An agent
	 * schedules its behaviours calling their action() method; since all the
	 * behaviours belonging to the same agent are scheduled cooperatively, this
	 * method must not enter in an endless loop and should return as soon as
	 * possible to preserve agent responsiveness. To split a long and slow task
	 * into smaller section, recursive behaviour aggregation may be used.
	 */
	@Override
	public abstract void action();
}
